package cn.yerly.sakura.dao.model;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 * 产品图片
 * 
 * @author yerly
 *
 */
@Entity
public class ItemImage {
	@Id
	private Long id;
	@ManyToOne
	private Image image;
	@ManyToOne
	private Item item;
	private Integer orders;
	private Boolean main;
	private Boolean disabled;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Image getImage() {
		return image;
	}

	public void setImage(Image image) {
		this.image = image;
	}

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public Integer getOrders() {
		return orders;
	}

	public void setOrders(Integer orders) {
		this.orders = orders;
	}

	public Boolean getMain() {
		return main;
	}

	public void setMain(Boolean main) {
		this.main = main;
	}

	public Boolean getDisabled() {
		return disabled;
	}

	public void setDisabled(Boolean disabled) {
		this.disabled = disabled;
	}

	@Override
	public String toString() {
		return "ItemImage [id=" + id + ", image=" + image + ", item=" + item
				+ ", orders=" + orders + ", main=" + main + ", disabled="
				+ disabled + "]";
	}

}
